{% extends "base.html" %}

{% block container %}
    <div class="list-group">
        {% for post in posts %}
        <a class="list-group-item" href="/post/read/?post_id={{post.id}}">
            <span class="text-info">{{post.created | date:"Y-m-d H:i:s"}}</span>
            <strong>{{post.title}}</strong>
        </a>
        {% endfor %}
    </div>

    <nav aria-label="Page navigation">
        <ul class="pagination">
            {% for n in pages %}
            <li><a href="/post/list/?page={{forloop.counter}}">{{forloop.counter}}</a></li>
            {% endfor %}
        </ul>
    </nav>

{% endblock %}
